package com.linkhub.oms.admin.modules.pickuporder.listener;

import cn.hutool.core.convert.Convert;
import com.google.common.collect.Lists;
import com.linkhub.oms.admin.modules.pickuporder.domain.dto.EntryOrderLineExcelDTO;
import com.linkhub.oms.component.excel.listener.BaseDataListener;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @Description: EntryOrderLineListener
 * @Author: echo
 * @Date: 2024/5/4 19:39
 * @Version: 1.0
 */
@Slf4j
public class EntryOrderLineListener extends BaseDataListener<EntryOrderLineExcelDTO> {
    public EntryOrderLineListener(List<EntryOrderLineExcelDTO> list) {
        super(list);
    }

    public EntryOrderLineListener() {
        this(Lists.newArrayList());
    }

    @Override
    protected boolean predicate(EntryOrderLineExcelDTO data) {
        return Convert.toInt(data.getQuantity(), 0) > 0;
    }
}
